import request from '@/utils/request'


export function delMaintenance(roadId) {
  return request({
    url: '/maintenance/'+roadId,
    method: 'delete'
  })
}

// 修改
export function maintenanceUpdate(data) {
  return request({
    url: '/maintenance/update',
    method: 'put',
    data: data
  })
}
// 查询维修详细
export function getMaintenance(roadId) {
  return request({
    url: '/maintenance/' + roadId,
    method: 'get'
  })
}

// 查询维修记录
export function listMaintenance(query) {
  return request({
    url: '/maintenance/list',
    method: 'get',
    params: query
  })
}



// 增加维修信息
export function addMaintenance(data) {
  return request({
    url: '/maintenance/add',
    method: 'post',
    data
  })
}


// 上传图片
export function uploadImage(data){
  return request({
    url: '/upload/image',
    method: 'post',
    data
  })
}


// 删除图片
export function delImage(filePath){
  return request({
    url: '/system/file/delete?filePath='+filePath,
    method: 'delete'
  })
}

